import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '源订单id',
    align: "center",
    dataIndex: 'sourceOrderId'
  },
  {
    title: '订单id',
    align: "center",
    dataIndex: 'orderNo'
  },
  {
    title: '订单金额',
    align: "center",
    dataIndex: 'orderAmount'
  },
  {
    title: '分拥金额',
    align: "center",
    dataIndex: 'reward'
  },
  {
    title: '分佣占比',
    align: "center",
    dataIndex: 'rewardPct'
  },
  {
    title: '消费日期',
    align: "center",
    dataIndex: 'orderDate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '原订单信息',
    align: "center",
    dataIndex: 'sourceOrderInfo'
  },
  {
    title: '一级团队id',
    align: "center",
    dataIndex: 'teamFirstId_dictText'
  },
  {
    title: '一级团队等级',
    align: "center",
    dataIndex: 'teamFirstLevel_dictText'
  },
  {
    title: '一级团队分佣比例',
    align: "center",
    dataIndex: 'teamFirstPct'
  },
  {
    title: '一级团队分佣金额',
    align: "center",
    dataIndex: 'teamFirstFyamount'
  },
  {
    title: '二级团队id',
    align: "center",
    dataIndex: 'teamSecondId_dictText'
  },
  {
    title: '二级团队等级',
    align: "center",
    dataIndex: 'teamSecondLevel_dictText'
  },
  {
    title: '二级团队分佣比例',
    align: "center",
    dataIndex: 'teamSecondPct'
  },
  {
    title: '二级团队分佣金额',
    align: "center",
    dataIndex: 'teamSecondFyamount'
  },
  {
    title: '是否作废 1.是 0.否',
    align: "center",
    dataIndex: 'isDelete_dictText'
  },
];

// 高级查询数据
export const superQuerySchema = {
  sourceOrderId: {title: '源订单id',order: 0,view: 'text', type: 'string',},
  orderNo: {title: '订单id',order: 1,view: 'text', type: 'string',},
  orderAmount: {title: '订单金额',order: 2,view: 'number', type: 'number',},
  reward: {title: '分拥金额',order: 3,view: 'text', type: 'string',},
  rewardPct: {title: '分佣占比',order: 4,view: 'number', type: 'number',},
  orderDate: {title: '消费日期',order: 5,view: 'date', type: 'string',},
  sourceOrderInfo: {title: '原订单信息',order: 6,view: 'text', type: 'string',},
  teamFirstId: {title: '一级团队id',order: 7,view: 'sel_search', type: 'string',dictTable: "fx_member", dictCode: 'id', dictText: 'nickname',},
  teamFirstLevel: {title: '一级团队等级',order: 8,view: 'number', type: 'number',dictCode: 'member_level',},
  teamFirstPct: {title: '一级团队分佣比例',order: 9,view: 'text', type: 'string',},
  teamFirstFyamount: {title: '一级团队分佣金额',order: 10,view: 'number', type: 'number',},
  teamSecondId: {title: '二级团队id',order: 11,view: 'sel_search', type: 'string',dictTable: "fx_member", dictCode: 'id', dictText: 'nickname',},
  teamSecondLevel: {title: '二级团队等级',order: 12,view: 'number', type: 'number',dictCode: 'member_level',},
  teamSecondPct: {title: '二级团队分佣比例',order: 13,view: 'text', type: 'string',},
  teamSecondFyamount: {title: '二级团队分佣金额',order: 14,view: 'number', type: 'number',},
  isDelete: {title: '是否作废 1.是 0.否',order: 15,view: 'number', type: 'number',dictCode: 'yn',},
};
